<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>技术社区 | 首页</title>
    <style>
        /* 公共样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', sans-serif;
        }

        body {
            background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
            line-height: 1.6;
        }

        /* 导航栏 */
        .navbar {
            background: rgba(255, 255, 255, 0.95);
            padding: 15px 30px;
            border-radius: 15px;
            margin: 20px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .nav-links {
            display: flex;
            gap: 25px;
            list-style: none;
        }

        .nav-links a {
            color: #2d3436;
            text-decoration: none;
            padding: 8px 15px;
            border-radius: 20px;
            transition: all 0.3s ease;
        }

        .nav-links a:hover {
            background: #4ecdc4;
            color: white;
        }

        .auth-buttons {
            display: flex;
            gap: 15px;
        }

        /* 首页内容 */
        .hero {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            margin: 40px 20px;
            padding: 60px 40px;
            text-align: center;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
        }

        .hero h1 {
            font-size: 2.5em;
            color: #2d3436;
            margin-bottom: 20px;
        }

        .hero p {
            color: #636e72;
            max-width: 600px;
            margin: 0 auto 30px;
        }

        .cta-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            margin-top: 30px;
        }

        .cta-button {
            padding: 12px 35px;
            border-radius: 30px;
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .primary-cta {
            background: #4ecdc4;
            color: white;
        }

        .secondary-cta {
            background: #f5f6fa;
            color: #2d3436;
        }

        /* 精选文章 */
        .featured-articles {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin: 40px 20px;
        }

        .article-card {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 15px;
            padding: 25px;
            transition: transform 0.3s ease;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .article-card:hover {
            transform: translateY(-5px);
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .navbar {
                flex-direction: column;
                align-items: flex-start;
            }

            .nav-links {
                flex-direction: column;
                width: 100%;
                margin: 15px 0;
            }

            .auth-buttons {
                width: 100%;
                justify-content: space-between;
            }

            .cta-buttons {
                flex-direction: column;
            }

            .hero {
                padding: 40px 20px;
            }
        }
    </style>
</head>
<body>
    <nav class="navbar">
        <ul class="nav-links">
            <li><a href="/index.html">首页</a></li>
            <li><a href="/blog.html">技术文章</a></li>
            <li><a href="#">关于我们</a></li>
        </ul>
        <div class="auth-buttons">
            <a href="/login.html" class="cta-button secondary-cta">登录</a>
            <a href="/register.html" class="cta-button primary-cta">注册</a>
        </div>
    </nav>

    <div class="hero">
        <h1>探索技术新境界</h1>
        <p>加入开发者社区，获取最新技术资讯，分享开发经验，共同成长进步</p>
        <div class="cta-buttons">
            <a href="/blog.html" class="cta-button primary-cta">浏览文章</a>
            <a href="#" class="cta-button secondary-cta">了解详情</a>
        </div>
    </div>

    <div class="featured-articles">
        <div class="article-card">
            <h3>Vue 3 核心特性解析</h3>
            <p>深度剖析Vue 3的Composition API和响应式系统...</p>
            <a href="#" class="cta-button primary-cta" style="margin-top:15px; display:inline-block;">阅读全文</a>
        </div>
        
        <div class="article-card">
            <h3>TypeScript 最佳实践</h3>
            <p>如何构建类型安全的现代Web应用...</p>
            <a href="#" class="cta-button primary-cta" style="margin-top:15px; display:inline-block;">阅读全文</a>
        </div>
        
        <div class="article-card">
            <h3>微服务架构设计</h3>
            <p>从单体架构到分布式系统的演进之路...</p>
            <a href="#" class="cta-button primary-cta" style="margin-top:15px; display:inline-block;">阅读全文</a>
        </div>
    </div>

    <script>
        // 移动端优化脚本
        document.addEventListener('DOMContentLoaded', function() {
            // 防止多次点击
            const buttons = document.querySelectorAll('a, button');
            buttons.forEach(btn => {
                btn.addEventListener('click', function(e) {
                    if (this.classList.contains('disabled')) {
                        e.preventDefault();
                        return;
                    }
                    this.classList.add('disabled');
                    setTimeout(() => {
                        this.classList.remove('disabled');
                    }, 1000);
                });
            });

            // 触摸优化
            document.body.addEventListener('touchstart', function(){}, { passive: true });
        });
    </script>
</body>
</html>